package com.qf.controller;

import com.qf.pojo.resp.BaseResult;
import com.qf.service.impl.IntegralServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/integral")
public class IntegralController {
    @Autowired
    IntegralServiceImpl integralService;

    @RequestMapping("/findAll")
    @ResponseBody
    public BaseResult findAll(){
        BaseResult baseResult =new BaseResult();
        baseResult.setCode(1);
        baseResult.setData(integralService.findAll());

        return baseResult;
    }
    @RequestMapping("/findAllByMonth")
    @ResponseBody
    public BaseResult findAllByMonth(){
        BaseResult baseResult =new BaseResult();
        baseResult.setCode(1);
        baseResult.setData(integralService.findAllByMonth());
        return baseResult;
    }
}
